<template>
  <div class="culture" v-if="data.length"> 
    <div class="culture-title"></div>
    <div class="culture-content" >
      <div class="culture-list">
        <a class="culture-item" v-for="item in data" :key="item.id" :href="item.linkUrl" target="_blank">
          <div class="culture-left">
            <!-- @/assets/images/heritage.png -->
            <img :src="item.imgUrl" alt="" class="culture-img"/>
            <div class="text-tag">
              {{ item.type }}
            </div>
          </div>

          <div class="culture-right">
            <div class="text-name">{{item.name}}</div>
            <div class="text-info">{{item.orgName}}&nbsp;&nbsp;|&nbsp;&nbsp;{{item.isbnNo}}</div>
            <div class="text-msg">{{item.intro}}</div>
          </div>

          <div class="text-num"><span class="count">{{item.pageView}}</span> 次查看</div>
        </a>
      </div>
      
    </div>
  </div>
</template>
<script setup>
  const props = defineProps({
    data: {
      type: Array,
      default: []
    },
  })
</script>
<style lang="scss" scoped>
.culture{
  height: 926px;
  background: url('@/assets/images/culture-bg.png') no-repeat center center;
  display: flex;
  flex-direction: column;
  width: 100%;
  align-items: center;
  .culture-title{
    width: 1058px;
    height: 125px;
    background: url('@/assets/images/culture-title.png') no-repeat;
    margin-top: 30px;
  }
  .culture-content {
    width: 1280px;
    overflow: hidden;
  }
  .culture-list{
    width: 100%;
    display: flex;
    margin-top: 58px;
    justify-content: space-between;
    flex-wrap: wrap;
    .culture-item{
      width: 620px;
      height: 181px;
      background-color: #fff;
      margin-bottom: 20px;
      display: flex;
      // justify-content: center;
      padding: 0 30px;
      align-items: center;
      position: relative;
      &:hover{
        .text-name{
          color: #B52628!important;
        }
        .count{
          color: #F7544F!important;
        }
        .culture-img {
          transform: scale(1.1);
          box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); // 添加阴影
        }
      }
      .culture-left{
        height: 141px;
        width: 100px;
        position: relative;
        .culture-img{
          height: 141px;
          width: 100px;
          transition: transform 0.4s ease, box-shadow 0.3s ease;
        }
        .text-tag{
          position: absolute;
          left: 0;
          bottom: 0;
          font-weight: 400;
          font-size: 14px;
          color: #FFFFFF;
          // width: 45px;
          padding: 0 10px;
          height: 24px;
          background: #AA7B3B;
          border-radius: 2px;
        }
      }
      .text-num{
        position: absolute;
        top: 20px;
        right: 30px;
        
        font-size: 16px;
        color: #777777;
        line-height: 17px;
        .count{
          font-weight: bold;
        }
      }
      .culture-right{
        height: 141px;
        flex: 1;
        margin-left: 24px;
        .text-name{
          font-weight: 500;
          font-size: 22px;
          color: #222222;
          line-height: 30px;
        }
        .text-info{
          font-weight: 400;
          font-size: 14px;
          color: #656565;
          line-height: 20px;
          margin-top: 10px;
        }
        .text-msg{
          font-weight: 400;
          font-size: 14px;
          color: #999999;
          line-height: 20px;
          margin-top: 10px;
        }
      }
    }
  }
}
</style>